<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', 'PostController@index');
Route::resource('discussion','PostController');


// 登录页面
Route::get('/user/login','UserController@login');
Route::post('/user/login','UserController@signin');
//注册页面
Route::get('/user/register','UserController@register');
Route::post('/user/register','UserController@store');
// 更换头像页面
Route::get('/user/avatar','UserController@avatar');
Route::post('/user/avatar','UserController@changeAvatar');
Route::post('/crop/api','UserController@cropAvatar');
Route::post('/post/upload','PostController@upload');
Route::get('/logout','UserController@logout');
Route::resource('comment','CommentsController');


//Route::resource('user','UserController');


//Auth::routes();
//Route::get('/home', 'HomeController@index')->name('home');




